package cn.xnatural.demo.entity;

import cn.xnatural.jpa.LongIdEntity;
import javax.persistence.*;
import org.hibernate.annotations.DynamicUpdate;


/**
 * 全局配置 key value形式
 */
@Entity
@DynamicUpdate
@Table(indexes = {
        @Index(name = "idx_name", columnList = "name", unique = true)
})
public class Config extends LongIdEntity {
    /**
     * 属性名
     */
    @Column(nullable = false)
    protected String name;
    /**
     * 值
     */
    @Column(columnDefinition = "text")
    protected String value;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
